package com.kaifamiao.thread.d0928.pm;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class GroupClient {

    public static void main(String[] args) throws Exception{
        InetAddress address = InetAddress.getByName("224.0.1.0");
        int port = 8888;
        DatagramSocket socket = new DatagramSocket();

        byte[] bytes = "10010".getBytes();

        DatagramPacket packet = new DatagramPacket(bytes, bytes.length, address, port);

        System.out.println(packet.getAddress());
        socket.send(packet);

        System.out.println("发送成功");

    }
}
